import request from '@/utils/request'

// 查询设备报警记录列表
export function listAlarm(query) {
  return request({
    url: '/dm/alarm/list',
    method: 'get',
    params: query
  })
}

// 查询设备报警记录详细
export function getAlarm(alarmId) {
  return request({
    url: '/dm/alarm/' + alarmId,
    method: 'get'
  })
}

// 新增设备报警记录
export function addAlarm(data) {
  return request({
    url: '/dm/alarm',
    method: 'post',
    data: data
  })
}

// 修改设备报警记录
export function updateAlarm(data) {
  return request({
    url: '/dm/alarm',
    method: 'put',
    data: data
  })
}

// 删除设备报警记录
export function delAlarm(alarmId) {
  return request({
    url: '/dm/alarm/' + alarmId,
    method: 'delete'
  })
}

// 查询设备名称(不分页)列表
// export function listEquipment(query) {
//   return request({
//     url: '/bdm/line/equipment/getlist',
//     method: 'get',
//     params: query
// })
// }


export function listEquipment(query) {
  return request({
    url: '/dm/maintenance/equipment/getlist',
    method: 'get',
    params: query
})
}